package sg.nus.iss.vmcs.guilisteners;

import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import sg.nus.iss.vmcs.controllers.MaintenanceController;

/**
 * Action Listener for the Transfer Cash Button on the Maintenance Panel 
 * @author Pang Pingli
 */
public class TransferCashButtonListener implements ActionListener {
	
	/** Reference to the Maintenance Controller */
	private MaintenanceController mctrl;
	
	/**
	 * Creates an instance of the Transfer Cash Button Listener
	 * @param mc Reference to the Maintenance Controller
	 */
	public TransferCashButtonListener(MaintenanceController mc) {
		mctrl = mc;
	}
  
	/**
	 * Implementation of actionPerformed
	 */
	public void actionPerformed(ActionEvent e) {
        mctrl.transferAll();
	}
}